Left Termination of the query pattern perm_in_2(g, a) w.r.t. the given Prolog program could successfully be proven:



Prolog
  ↳ PrologToPiTRSProof

Clauses:

append2(parts([], Y), is(sum(Y))).
append2(parts(.(H, X), Y), is(sum(.(H, Z)))) :- append2(parts(X, Y), is(sum(Z))).
append1(parts([], Y), is(sum(Y))).
append1(parts(.(H, X), Y), is(sum(.(H, Z)))) :- append1(parts(X, Y), is(sum(Z))).
perm([], []).
perm(L, .(H, T)) :- ','(append2(parts(V, .(H, U)), is(sum(L))), ','(append1(parts(V, U), is(sum(W))), perm(W, T))).

Queries:

perm(g,a).

We use the technique of [30]. With regard to the inferred argument filtering the predicates were used in the following modes:
perm_in: (b,f)
append2_in: (f,b)
append1_in: (b,f)
Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(L, .(H, T)) → U3_ga(L, H, T, append2_in_ag(parts(V, .(H, U)), is(sum(L))))
append2_in_ag(parts([], Y), is(sum(Y))) → append2_out_ag(parts([], Y), is(sum(Y)))
append2_in_ag(parts(.(H, X), Y), is(sum(.(H, Z)))) → U1_ag(H, X, Y, Z, append2_in_ag(parts(X, Y), is(sum(Z))))
U1_ag(H, X, Y, Z, append2_out_ag(parts(X, Y), is(sum(Z)))) → append2_out_ag(parts(.(H, X), Y), is(sum(.(H, Z))))
U3_ga(L, H, T, append2_out_ag(parts(V, .(H, U)), is(sum(L)))) → U4_ga(L, H, T, V, U, append1_in_ga(parts(V, U), is(sum(W))))
append1_in_ga(parts([], Y), is(sum(Y))) → append1_out_ga(parts([], Y), is(sum(Y)))
append1_in_ga(parts(.(H, X), Y), is(sum(.(H, Z)))) → U2_ga(H, X, Y, Z, append1_in_ga(parts(X, Y), is(sum(Z))))
U2_ga(H, X, Y, Z, append1_out_ga(parts(X, Y), is(sum(Z)))) → append1_out_ga(parts(.(H, X), Y), is(sum(.(H, Z))))
U4_ga(L, H, T, V, U, append1_out_ga(parts(V, U), is(sum(W)))) → U5_ga(L, H, T, perm_in_ga(W, T))
U5_ga(L, H, T, perm_out_ga(W, T)) → perm_out_ga(L, .(H, T))

The argument filtering Pi contains the following mapping:
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x2)
U3_ga(x1, x2, x3, x4)  =  U3_ga(x4)
append2_in_ag(x1, x2)  =  append2_in_ag(x2)
.(x1, x2)  =  .(x2)
is(x1)  =  is(x1)
sum(x1)  =  sum(x1)
append2_out_ag(x1, x2)  =  append2_out_ag(x1)
U1_ag(x1, x2, x3, x4, x5)  =  U1_ag(x5)
parts(x1, x2)  =  parts(x1, x2)
U4_ga(x1, x2, x3, x4, x5, x6)  =  U4_ga(x6)
append1_in_ga(x1, x2)  =  append1_in_ga(x1)
append1_out_ga(x1, x2)  =  append1_out_ga(x2)
U2_ga(x1, x2, x3, x4, x5)  =  U2_ga(x5)
U5_ga(x1, x2, x3, x4)  =  U5_ga(x4)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog



↳ Prolog
  ↳ PrologToPiTRSProof
PiTRS
      ↳ DependencyPairsProof

Pi-finite rewrite system:
The TRS R consists of the following rules:

perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(L, .(H, T)) → U3_ga(L, H, T, append2_in_ag(parts(V, .(H, U)), is(sum(L))))
append2_in_ag(parts([], Y), is(sum(Y))) → append2_out_ag(parts([], Y), is(sum(Y)))
append2_in_ag(parts(.(H, X), Y), is(sum(.(H, Z)))) → U1_ag(H, X, Y, Z, append2_in_ag(parts(X, Y), is(sum(Z))))
U1_ag(H, X, Y, Z, append2_out_ag(parts(X, Y), is(sum(Z)))) → append2_out_ag(parts(.(H, X), Y), is(sum(.(H, Z))))
U3_ga(L, H, T, append2_out_ag(parts(V, .(H, U)), is(sum(L)))) → U4_ga(L, H, T, V, U, append1_in_ga(parts(V, U), is(sum(W))))
append1_in_ga(parts([], Y), is(sum(Y))) → append1_out_ga(parts([], Y), is(sum(Y)))
append1_in_ga(parts(.(H, X), Y), is(sum(.(H, Z)))) → U2_ga(H, X, Y, Z, append1_in_ga(parts(X, Y), is(sum(Z))))
U2_ga(H, X, Y, Z, append1_out_ga(parts(X, Y), is(sum(Z)))) → append1_out_ga(parts(.(H, X), Y), is(sum(.(H, Z))))
U4_ga(L, H, T, V, U, append1_out_ga(parts(V, U), is(sum(W)))) → U5_ga(L, H, T, perm_in_ga(W, T))
U5_ga(L, H, T, perm_out_ga(W, T)) → perm_out_ga(L, .(H, T))

The argument filtering Pi contains the following mapping:
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x2)
U3_ga(x1, x2, x3, x4)  =  U3_ga(x4)
append2_in_ag(x1, x2)  =  append2_in_ag(x2)
.(x1, x2)  =  .(x2)
is(x1)  =  is(x1)
sum(x1)  =  sum(x1)
append2_out_ag(x1, x2)  =  append2_out_ag(x1)
U1_ag(x1, x2, x3, x4, x5)  =  U1_ag(x5)
parts(x1, x2)  =  parts(x1, x2)
U4_ga(x1, x2, x3, x4, x5, x6)  =  U4_ga(x6)
append1_in_ga(x1, x2)  =  append1_in_ga(x1)
append1_out_ga(x1, x2)  =  append1_out_ga(x2)
U2_ga(x1, x2, x3, x4, x5)  =  U2_ga(x5)
U5_ga(x1, x2, x3, x4)  =  U5_ga(x4)


Using Dependency Pairs [1,30] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

PERM_IN_GA(L, .(H, T)) → U3_GA(L, H, T, append2_in_ag(parts(V, .(H, U)), is(sum(L))))
PERM_IN_GA(L, .(H, T)) → APPEND2_IN_AG(parts(V, .(H, U)), is(sum(L)))
APPEND2_IN_AG(parts(.(H, X), Y), is(sum(.(H, Z)))) → U1_AG(H, X, Y, Z, append2_in_ag(parts(X, Y), is(sum(Z))))
APPEND2_IN_AG(parts(.(H, X), Y), is(sum(.(H, Z)))) → APPEND2_IN_AG(parts(X, Y), is(sum(Z)))
U3_GA(L, H, T, append2_out_ag(parts(V, .(H, U)), is(sum(L)))) → U4_GA(L, H, T, V, U, append1_in_ga(parts(V, U), is(sum(W))))
U3_GA(L, H, T, append2_out_ag(parts(V, .(H, U)), is(sum(L)))) → APPEND1_IN_GA(parts(V, U), is(sum(W)))
APPEND1_IN_GA(parts(.(H, X), Y), is(sum(.(H, Z)))) → U2_GA(H, X, Y, Z, append1_in_ga(parts(X, Y), is(sum(Z))))
APPEND1_IN_GA(parts(.(H, X), Y), is(sum(.(H, Z)))) → APPEND1_IN_GA(parts(X, Y), is(sum(Z)))
U4_GA(L, H, T, V, U, append1_out_ga(parts(V, U), is(sum(W)))) → U5_GA(L, H, T, perm_in_ga(W, T))
U4_GA(L, H, T, V, U, append1_out_ga(parts(V, U), is(sum(W)))) → PERM_IN_GA(W, T)

The TRS R consists of the following rules:

perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(L, .(H, T)) → U3_ga(L, H, T, append2_in_ag(parts(V, .(H, U)), is(sum(L))))
append2_in_ag(parts([], Y), is(sum(Y))) → append2_out_ag(parts([], Y), is(sum(Y)))
append2_in_ag(parts(.(H, X), Y), is(sum(.(H, Z)))) → U1_ag(H, X, Y, Z, append2_in_ag(parts(X, Y), is(sum(Z))))
U1_ag(H, X, Y, Z, append2_out_ag(parts(X, Y), is(sum(Z)))) → append2_out_ag(parts(.(H, X), Y), is(sum(.(H, Z))))
U3_ga(L, H, T, append2_out_ag(parts(V, .(H, U)), is(sum(L)))) → U4_ga(L, H, T, V, U, append1_in_ga(parts(V, U), is(sum(W))))
append1_in_ga(parts([], Y), is(sum(Y))) → append1_out_ga(parts([], Y), is(sum(Y)))
append1_in_ga(parts(.(H, X), Y), is(sum(.(H, Z)))) → U2_ga(H, X, Y, Z, append1_in_ga(parts(X, Y), is(sum(Z))))
U2_ga(H, X, Y, Z, append1_out_ga(parts(X, Y), is(sum(Z)))) → append1_out_ga(parts(.(H, X), Y), is(sum(.(H, Z))))
U4_ga(L, H, T, V, U, append1_out_ga(parts(V, U), is(sum(W)))) → U5_ga(L, H, T, perm_in_ga(W, T))
U5_ga(L, H, T, perm_out_ga(W, T)) → perm_out_ga(L, .(H, T))

The argument filtering Pi contains the following mapping:
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x2)
U3_ga(x1, x2, x3, x4)  =  U3_ga(x4)
append2_in_ag(x1, x2)  =  append2_in_ag(x2)
.(x1, x2)  =  .(x2)
is(x1)  =  is(x1)
sum(x1)  =  sum(x1)
append2_out_ag(x1, x2)  =  append2_out_ag(x1)
U1_ag(x1, x2, x3, x4, x5)  =  U1_ag(x5)
parts(x1, x2)  =  parts(x1, x2)
U4_ga(x1, x2, x3, x4, x5, x6)  =  U4_ga(x6)
append1_in_ga(x1, x2)  =  append1_in_ga(x1)
append1_out_ga(x1, x2)  =  append1_out_ga(x2)
U2_ga(x1, x2, x3, x4, x5)  =  U2_ga(x5)
U5_ga(x1, x2, x3, x4)  =  U5_ga(x4)
U5_GA(x1, x2, x3, x4)  =  U5_GA(x4)
U2_GA(x1, x2, x3, x4, x5)  =  U2_GA(x5)
U4_GA(x1, x2, x3, x4, x5, x6)  =  U4_GA(x6)
U3_GA(x1, x2, x3, x4)  =  U3_GA(x4)
APPEND1_IN_GA(x1, x2)  =  APPEND1_IN_GA(x1)
U1_AG(x1, x2, x3, x4, x5)  =  U1_AG(x5)
PERM_IN_GA(x1, x2)  =  PERM_IN_GA(x1)
APPEND2_IN_AG(x1, x2)  =  APPEND2_IN_AG(x2)

We have to consider all (P,R,Pi)-chains

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
PiDP
          ↳ DependencyGraphProof

Pi DP problem:
The TRS P consists of the following rules:

PERM_IN_GA(L, .(H, T)) → U3_GA(L, H, T, append2_in_ag(parts(V, .(H, U)), is(sum(L))))
PERM_IN_GA(L, .(H, T)) → APPEND2_IN_AG(parts(V, .(H, U)), is(sum(L)))
APPEND2_IN_AG(parts(.(H, X), Y), is(sum(.(H, Z)))) → U1_AG(H, X, Y, Z, append2_in_ag(parts(X, Y), is(sum(Z))))
APPEND2_IN_AG(parts(.(H, X), Y), is(sum(.(H, Z)))) → APPEND2_IN_AG(parts(X, Y), is(sum(Z)))
U3_GA(L, H, T, append2_out_ag(parts(V, .(H, U)), is(sum(L)))) → U4_GA(L, H, T, V, U, append1_in_ga(parts(V, U), is(sum(W))))
U3_GA(L, H, T, append2_out_ag(parts(V, .(H, U)), is(sum(L)))) → APPEND1_IN_GA(parts(V, U), is(sum(W)))
APPEND1_IN_GA(parts(.(H, X), Y), is(sum(.(H, Z)))) → U2_GA(H, X, Y, Z, append1_in_ga(parts(X, Y), is(sum(Z))))
APPEND1_IN_GA(parts(.(H, X), Y), is(sum(.(H, Z)))) → APPEND1_IN_GA(parts(X, Y), is(sum(Z)))
U4_GA(L, H, T, V, U, append1_out_ga(parts(V, U), is(sum(W)))) → U5_GA(L, H, T, perm_in_ga(W, T))
U4_GA(L, H, T, V, U, append1_out_ga(parts(V, U), is(sum(W)))) → PERM_IN_GA(W, T)

The TRS R consists of the following rules:

perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(L, .(H, T)) → U3_ga(L, H, T, append2_in_ag(parts(V, .(H, U)), is(sum(L))))
append2_in_ag(parts([], Y), is(sum(Y))) → append2_out_ag(parts([], Y), is(sum(Y)))
append2_in_ag(parts(.(H, X), Y), is(sum(.(H, Z)))) → U1_ag(H, X, Y, Z, append2_in_ag(parts(X, Y), is(sum(Z))))
U1_ag(H, X, Y, Z, append2_out_ag(parts(X, Y), is(sum(Z)))) → append2_out_ag(parts(.(H, X), Y), is(sum(.(H, Z))))
U3_ga(L, H, T, append2_out_ag(parts(V, .(H, U)), is(sum(L)))) → U4_ga(L, H, T, V, U, append1_in_ga(parts(V, U), is(sum(W))))
append1_in_ga(parts([], Y), is(sum(Y))) → append1_out_ga(parts([], Y), is(sum(Y)))
append1_in_ga(parts(.(H, X), Y), is(sum(.(H, Z)))) → U2_ga(H, X, Y, Z, append1_in_ga(parts(X, Y), is(sum(Z))))
U2_ga(H, X, Y, Z, append1_out_ga(parts(X, Y), is(sum(Z)))) → append1_out_ga(parts(.(H, X), Y), is(sum(.(H, Z))))
U4_ga(L, H, T, V, U, append1_out_ga(parts(V, U), is(sum(W)))) → U5_ga(L, H, T, perm_in_ga(W, T))
U5_ga(L, H, T, perm_out_ga(W, T)) → perm_out_ga(L, .(H, T))

The argument filtering Pi contains the following mapping:
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x2)
U3_ga(x1, x2, x3, x4)  =  U3_ga(x4)
append2_in_ag(x1, x2)  =  append2_in_ag(x2)
.(x1, x2)  =  .(x2)
is(x1)  =  is(x1)
sum(x1)  =  sum(x1)
append2_out_ag(x1, x2)  =  append2_out_ag(x1)
U1_ag(x1, x2, x3, x4, x5)  =  U1_ag(x5)
parts(x1, x2)  =  parts(x1, x2)
U4_ga(x1, x2, x3, x4, x5, x6)  =  U4_ga(x6)
append1_in_ga(x1, x2)  =  append1_in_ga(x1)
append1_out_ga(x1, x2)  =  append1_out_ga(x2)
U2_ga(x1, x2, x3, x4, x5)  =  U2_ga(x5)
U5_ga(x1, x2, x3, x4)  =  U5_ga(x4)
U5_GA(x1, x2, x3, x4)  =  U5_GA(x4)
U2_GA(x1, x2, x3, x4, x5)  =  U2_GA(x5)
U4_GA(x1, x2, x3, x4, x5, x6)  =  U4_GA(x6)
U3_GA(x1, x2, x3, x4)  =  U3_GA(x4)
APPEND1_IN_GA(x1, x2)  =  APPEND1_IN_GA(x1)
U1_AG(x1, x2, x3, x4, x5)  =  U1_AG(x5)
PERM_IN_GA(x1, x2)  =  PERM_IN_GA(x1)
APPEND2_IN_AG(x1, x2)  =  APPEND2_IN_AG(x2)

We have to consider all (P,R,Pi)-chains
The approximation of the Dependency Graph [30] contains 3 SCCs with 5 less nodes.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

APPEND1_IN_GA(parts(.(H, X), Y), is(sum(.(H, Z)))) → APPEND1_IN_GA(parts(X, Y), is(sum(Z)))

The TRS R consists of the following rules:

perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(L, .(H, T)) → U3_ga(L, H, T, append2_in_ag(parts(V, .(H, U)), is(sum(L))))
append2_in_ag(parts([], Y), is(sum(Y))) → append2_out_ag(parts([], Y), is(sum(Y)))
append2_in_ag(parts(.(H, X), Y), is(sum(.(H, Z)))) → U1_ag(H, X, Y, Z, append2_in_ag(parts(X, Y), is(sum(Z))))
U1_ag(H, X, Y, Z, append2_out_ag(parts(X, Y), is(sum(Z)))) → append2_out_ag(parts(.(H, X), Y), is(sum(.(H, Z))))
U3_ga(L, H, T, append2_out_ag(parts(V, .(H, U)), is(sum(L)))) → U4_ga(L, H, T, V, U, append1_in_ga(parts(V, U), is(sum(W))))
append1_in_ga(parts([], Y), is(sum(Y))) → append1_out_ga(parts([], Y), is(sum(Y)))
append1_in_ga(parts(.(H, X), Y), is(sum(.(H, Z)))) → U2_ga(H, X, Y, Z, append1_in_ga(parts(X, Y), is(sum(Z))))
U2_ga(H, X, Y, Z, append1_out_ga(parts(X, Y), is(sum(Z)))) → append1_out_ga(parts(.(H, X), Y), is(sum(.(H, Z))))
U4_ga(L, H, T, V, U, append1_out_ga(parts(V, U), is(sum(W)))) → U5_ga(L, H, T, perm_in_ga(W, T))
U5_ga(L, H, T, perm_out_ga(W, T)) → perm_out_ga(L, .(H, T))

The argument filtering Pi contains the following mapping:
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x2)
U3_ga(x1, x2, x3, x4)  =  U3_ga(x4)
append2_in_ag(x1, x2)  =  append2_in_ag(x2)
.(x1, x2)  =  .(x2)
is(x1)  =  is(x1)
sum(x1)  =  sum(x1)
append2_out_ag(x1, x2)  =  append2_out_ag(x1)
U1_ag(x1, x2, x3, x4, x5)  =  U1_ag(x5)
parts(x1, x2)  =  parts(x1, x2)
U4_ga(x1, x2, x3, x4, x5, x6)  =  U4_ga(x6)
append1_in_ga(x1, x2)  =  append1_in_ga(x1)
append1_out_ga(x1, x2)  =  append1_out_ga(x2)
U2_ga(x1, x2, x3, x4, x5)  =  U2_ga(x5)
U5_ga(x1, x2, x3, x4)  =  U5_ga(x4)
APPEND1_IN_GA(x1, x2)  =  APPEND1_IN_GA(x1)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

APPEND1_IN_GA(parts(.(H, X), Y), is(sum(.(H, Z)))) → APPEND1_IN_GA(parts(X, Y), is(sum(Z)))

R is empty.
The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x2)
is(x1)  =  is(x1)
sum(x1)  =  sum(x1)
parts(x1, x2)  =  parts(x1, x2)
APPEND1_IN_GA(x1, x2)  =  APPEND1_IN_GA(x1)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ UsableRulesReductionPairsProof
              ↳ PiDP
              ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

APPEND1_IN_GA(parts(.(X), Y)) → APPEND1_IN_GA(parts(X, Y))

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
By using the usable rules with reduction pair processor [15] with a polynomial ordering [25], all dependency pairs and the corresponding usable rules [17] can be oriented non-strictly. All non-usable rules are removed, and those dependency pairs and usable rules that have been oriented strictly or contain non-usable symbols in their left-hand side are removed as well.

The following dependency pairs can be deleted:

APPEND1_IN_GA(parts(.(X), Y)) → APPEND1_IN_GA(parts(X, Y))
No rules are removed from R.

Used ordering: POLO with Polynomial interpretation [25]:

POL(.(x1)) = 2·x1   
POL(APPEND1_IN_GA(x1)) = 2·x1   
POL(parts(x1, x2)) = 2·x1 + x2   



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ UsableRulesReductionPairsProof
QDP
                            ↳ PisEmptyProof
              ↳ PiDP
              ↳ PiDP

Q DP problem:
P is empty.
R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

APPEND2_IN_AG(parts(.(H, X), Y), is(sum(.(H, Z)))) → APPEND2_IN_AG(parts(X, Y), is(sum(Z)))

The TRS R consists of the following rules:

perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(L, .(H, T)) → U3_ga(L, H, T, append2_in_ag(parts(V, .(H, U)), is(sum(L))))
append2_in_ag(parts([], Y), is(sum(Y))) → append2_out_ag(parts([], Y), is(sum(Y)))
append2_in_ag(parts(.(H, X), Y), is(sum(.(H, Z)))) → U1_ag(H, X, Y, Z, append2_in_ag(parts(X, Y), is(sum(Z))))
U1_ag(H, X, Y, Z, append2_out_ag(parts(X, Y), is(sum(Z)))) → append2_out_ag(parts(.(H, X), Y), is(sum(.(H, Z))))
U3_ga(L, H, T, append2_out_ag(parts(V, .(H, U)), is(sum(L)))) → U4_ga(L, H, T, V, U, append1_in_ga(parts(V, U), is(sum(W))))
append1_in_ga(parts([], Y), is(sum(Y))) → append1_out_ga(parts([], Y), is(sum(Y)))
append1_in_ga(parts(.(H, X), Y), is(sum(.(H, Z)))) → U2_ga(H, X, Y, Z, append1_in_ga(parts(X, Y), is(sum(Z))))
U2_ga(H, X, Y, Z, append1_out_ga(parts(X, Y), is(sum(Z)))) → append1_out_ga(parts(.(H, X), Y), is(sum(.(H, Z))))
U4_ga(L, H, T, V, U, append1_out_ga(parts(V, U), is(sum(W)))) → U5_ga(L, H, T, perm_in_ga(W, T))
U5_ga(L, H, T, perm_out_ga(W, T)) → perm_out_ga(L, .(H, T))

The argument filtering Pi contains the following mapping:
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x2)
U3_ga(x1, x2, x3, x4)  =  U3_ga(x4)
append2_in_ag(x1, x2)  =  append2_in_ag(x2)
.(x1, x2)  =  .(x2)
is(x1)  =  is(x1)
sum(x1)  =  sum(x1)
append2_out_ag(x1, x2)  =  append2_out_ag(x1)
U1_ag(x1, x2, x3, x4, x5)  =  U1_ag(x5)
parts(x1, x2)  =  parts(x1, x2)
U4_ga(x1, x2, x3, x4, x5, x6)  =  U4_ga(x6)
append1_in_ga(x1, x2)  =  append1_in_ga(x1)
append1_out_ga(x1, x2)  =  append1_out_ga(x2)
U2_ga(x1, x2, x3, x4, x5)  =  U2_ga(x5)
U5_ga(x1, x2, x3, x4)  =  U5_ga(x4)
APPEND2_IN_AG(x1, x2)  =  APPEND2_IN_AG(x2)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

APPEND2_IN_AG(parts(.(H, X), Y), is(sum(.(H, Z)))) → APPEND2_IN_AG(parts(X, Y), is(sum(Z)))

R is empty.
The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x2)
is(x1)  =  is(x1)
sum(x1)  =  sum(x1)
parts(x1, x2)  =  parts(x1, x2)
APPEND2_IN_AG(x1, x2)  =  APPEND2_IN_AG(x2)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ UsableRulesReductionPairsProof
              ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

APPEND2_IN_AG(is(sum(.(Z)))) → APPEND2_IN_AG(is(sum(Z)))

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
By using the usable rules with reduction pair processor [15] with a polynomial ordering [25], all dependency pairs and the corresponding usable rules [17] can be oriented non-strictly. All non-usable rules are removed, and those dependency pairs and usable rules that have been oriented strictly or contain non-usable symbols in their left-hand side are removed as well.

The following dependency pairs can be deleted:

APPEND2_IN_AG(is(sum(.(Z)))) → APPEND2_IN_AG(is(sum(Z)))
No rules are removed from R.

Used ordering: POLO with Polynomial interpretation [25]:

POL(.(x1)) = 2·x1   
POL(APPEND2_IN_AG(x1)) = 2·x1   
POL(is(x1)) = 2·x1   
POL(sum(x1)) = 2·x1   



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ UsableRulesReductionPairsProof
QDP
                            ↳ PisEmptyProof
              ↳ PiDP

Q DP problem:
P is empty.
R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
PiDP
                ↳ UsableRulesProof

Pi DP problem:
The TRS P consists of the following rules:

U3_GA(L, H, T, append2_out_ag(parts(V, .(H, U)), is(sum(L)))) → U4_GA(L, H, T, V, U, append1_in_ga(parts(V, U), is(sum(W))))
PERM_IN_GA(L, .(H, T)) → U3_GA(L, H, T, append2_in_ag(parts(V, .(H, U)), is(sum(L))))
U4_GA(L, H, T, V, U, append1_out_ga(parts(V, U), is(sum(W)))) → PERM_IN_GA(W, T)

The TRS R consists of the following rules:

perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(L, .(H, T)) → U3_ga(L, H, T, append2_in_ag(parts(V, .(H, U)), is(sum(L))))
append2_in_ag(parts([], Y), is(sum(Y))) → append2_out_ag(parts([], Y), is(sum(Y)))
append2_in_ag(parts(.(H, X), Y), is(sum(.(H, Z)))) → U1_ag(H, X, Y, Z, append2_in_ag(parts(X, Y), is(sum(Z))))
U1_ag(H, X, Y, Z, append2_out_ag(parts(X, Y), is(sum(Z)))) → append2_out_ag(parts(.(H, X), Y), is(sum(.(H, Z))))
U3_ga(L, H, T, append2_out_ag(parts(V, .(H, U)), is(sum(L)))) → U4_ga(L, H, T, V, U, append1_in_ga(parts(V, U), is(sum(W))))
append1_in_ga(parts([], Y), is(sum(Y))) → append1_out_ga(parts([], Y), is(sum(Y)))
append1_in_ga(parts(.(H, X), Y), is(sum(.(H, Z)))) → U2_ga(H, X, Y, Z, append1_in_ga(parts(X, Y), is(sum(Z))))
U2_ga(H, X, Y, Z, append1_out_ga(parts(X, Y), is(sum(Z)))) → append1_out_ga(parts(.(H, X), Y), is(sum(.(H, Z))))
U4_ga(L, H, T, V, U, append1_out_ga(parts(V, U), is(sum(W)))) → U5_ga(L, H, T, perm_in_ga(W, T))
U5_ga(L, H, T, perm_out_ga(W, T)) → perm_out_ga(L, .(H, T))

The argument filtering Pi contains the following mapping:
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x2)
U3_ga(x1, x2, x3, x4)  =  U3_ga(x4)
append2_in_ag(x1, x2)  =  append2_in_ag(x2)
.(x1, x2)  =  .(x2)
is(x1)  =  is(x1)
sum(x1)  =  sum(x1)
append2_out_ag(x1, x2)  =  append2_out_ag(x1)
U1_ag(x1, x2, x3, x4, x5)  =  U1_ag(x5)
parts(x1, x2)  =  parts(x1, x2)
U4_ga(x1, x2, x3, x4, x5, x6)  =  U4_ga(x6)
append1_in_ga(x1, x2)  =  append1_in_ga(x1)
append1_out_ga(x1, x2)  =  append1_out_ga(x2)
U2_ga(x1, x2, x3, x4, x5)  =  U2_ga(x5)
U5_ga(x1, x2, x3, x4)  =  U5_ga(x4)
U4_GA(x1, x2, x3, x4, x5, x6)  =  U4_GA(x6)
U3_GA(x1, x2, x3, x4)  =  U3_GA(x4)
PERM_IN_GA(x1, x2)  =  PERM_IN_GA(x1)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof

Pi DP problem:
The TRS P consists of the following rules:

U3_GA(L, H, T, append2_out_ag(parts(V, .(H, U)), is(sum(L)))) → U4_GA(L, H, T, V, U, append1_in_ga(parts(V, U), is(sum(W))))
PERM_IN_GA(L, .(H, T)) → U3_GA(L, H, T, append2_in_ag(parts(V, .(H, U)), is(sum(L))))
U4_GA(L, H, T, V, U, append1_out_ga(parts(V, U), is(sum(W)))) → PERM_IN_GA(W, T)

The TRS R consists of the following rules:

append1_in_ga(parts([], Y), is(sum(Y))) → append1_out_ga(parts([], Y), is(sum(Y)))
append1_in_ga(parts(.(H, X), Y), is(sum(.(H, Z)))) → U2_ga(H, X, Y, Z, append1_in_ga(parts(X, Y), is(sum(Z))))
append2_in_ag(parts([], Y), is(sum(Y))) → append2_out_ag(parts([], Y), is(sum(Y)))
append2_in_ag(parts(.(H, X), Y), is(sum(.(H, Z)))) → U1_ag(H, X, Y, Z, append2_in_ag(parts(X, Y), is(sum(Z))))
U2_ga(H, X, Y, Z, append1_out_ga(parts(X, Y), is(sum(Z)))) → append1_out_ga(parts(.(H, X), Y), is(sum(.(H, Z))))
U1_ag(H, X, Y, Z, append2_out_ag(parts(X, Y), is(sum(Z)))) → append2_out_ag(parts(.(H, X), Y), is(sum(.(H, Z))))

The argument filtering Pi contains the following mapping:
[]  =  []
append2_in_ag(x1, x2)  =  append2_in_ag(x2)
.(x1, x2)  =  .(x2)
is(x1)  =  is(x1)
sum(x1)  =  sum(x1)
append2_out_ag(x1, x2)  =  append2_out_ag(x1)
U1_ag(x1, x2, x3, x4, x5)  =  U1_ag(x5)
parts(x1, x2)  =  parts(x1, x2)
append1_in_ga(x1, x2)  =  append1_in_ga(x1)
append1_out_ga(x1, x2)  =  append1_out_ga(x2)
U2_ga(x1, x2, x3, x4, x5)  =  U2_ga(x5)
U4_GA(x1, x2, x3, x4, x5, x6)  =  U4_GA(x6)
U3_GA(x1, x2, x3, x4)  =  U3_GA(x4)
PERM_IN_GA(x1, x2)  =  PERM_IN_GA(x1)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ RuleRemovalProof

Q DP problem:
The TRS P consists of the following rules:

PERM_IN_GA(L) → U3_GA(append2_in_ag(is(sum(L))))
U3_GA(append2_out_ag(parts(V, .(U)))) → U4_GA(append1_in_ga(parts(V, U)))
U4_GA(append1_out_ga(is(sum(W)))) → PERM_IN_GA(W)

The TRS R consists of the following rules:

append1_in_ga(parts([], Y)) → append1_out_ga(is(sum(Y)))
append1_in_ga(parts(.(X), Y)) → U2_ga(append1_in_ga(parts(X, Y)))
append2_in_ag(is(sum(Y))) → append2_out_ag(parts([], Y))
append2_in_ag(is(sum(.(Z)))) → U1_ag(append2_in_ag(is(sum(Z))))
U2_ga(append1_out_ga(is(sum(Z)))) → append1_out_ga(is(sum(.(Z))))
U1_ag(append2_out_ag(parts(X, Y))) → append2_out_ag(parts(.(X), Y))

The set Q consists of the following terms:

append1_in_ga(x0)
append2_in_ag(x0)
U2_ga(x0)
U1_ag(x0)

We have to consider all (P,Q,R)-chains.
By using the rule removal processor [15] with the following polynomial ordering [25], at least one Dependency Pair or term rewrite system rule of this QDP problem can be strictly oriented.
Strictly oriented dependency pairs:

U3_GA(append2_out_ag(parts(V, .(U)))) → U4_GA(append1_in_ga(parts(V, U)))


Used ordering: POLO with Polynomial interpretation [25]:

POL(.(x1)) = 1 + x1   
POL(PERM_IN_GA(x1)) = 2·x1   
POL(U1_ag(x1)) = 1 + x1   
POL(U2_ga(x1)) = 1 + x1   
POL(U3_GA(x1)) = 2·x1   
POL(U4_GA(x1)) = 2·x1   
POL([]) = 0   
POL(append1_in_ga(x1)) = x1   
POL(append1_out_ga(x1)) = x1   
POL(append2_in_ag(x1)) = x1   
POL(append2_out_ag(x1)) = x1   
POL(is(x1)) = x1   
POL(parts(x1, x2)) = x1 + x2   
POL(sum(x1)) = x1   



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ RuleRemovalProof
QDP
                            ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

PERM_IN_GA(L) → U3_GA(append2_in_ag(is(sum(L))))
U4_GA(append1_out_ga(is(sum(W)))) → PERM_IN_GA(W)

The TRS R consists of the following rules:

append1_in_ga(parts([], Y)) → append1_out_ga(is(sum(Y)))
append1_in_ga(parts(.(X), Y)) → U2_ga(append1_in_ga(parts(X, Y)))
append2_in_ag(is(sum(Y))) → append2_out_ag(parts([], Y))
append2_in_ag(is(sum(.(Z)))) → U1_ag(append2_in_ag(is(sum(Z))))
U2_ga(append1_out_ga(is(sum(Z)))) → append1_out_ga(is(sum(.(Z))))
U1_ag(append2_out_ag(parts(X, Y))) → append2_out_ag(parts(.(X), Y))

The set Q consists of the following terms:

append1_in_ga(x0)
append2_in_ag(x0)
U2_ga(x0)
U1_ag(x0)

We have to consider all (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 0 SCCs with 2 less nodes.